namespace DesignPattern.Structural.Composite
{
    public class Leaf : Component
    {
        public Leaf(string name) : base(name) {}

        public override void Display(int level)
        {
            string name = _name;

            for (var i = 0; i < level; i++)
            {
                name = "-" + name;
            }

            System.Console.WriteLine(name);
        }
    }
}